Skip to content

feat: move sdk plans#1424

Merged
rohanchkrabrty merged 10 commits intomainfrom
move-sdk-plans
Mar 2, 2026
Merged

feat: move sdk plans#1424
rohanchkrabrty merged 10 commits intomainfrom
move-sdk-plans

Conversation

@rohanchkrabrty
Copy link
Contributor

Summary

Migrate SDK plans page from router-coupled components to standalone view components, converting the confirm-plan-change modal from route-based to state-based.

Changes

  • Move plans page, pricing column, header, helpers, hooks, and CSS to react/views/plans/
  • Convert ConfirmPlanChange from a route-based component (useParams/useNavigate) to a state-based ConfirmPlanChangeDialog with open/onOpenChange/planId props
  • Replace useNavigate in PlanPricingColumn with onConfirmPlanChange callback prop
  • Remove <Outlet /> from the plans page — dialog now renders inline with state management
  • Remove /plans/confirm-change/$planId sub-route from routes.tsx
  • Replace components/organization/plans/index.tsx with thin wrapper that renders <PlansPage />
  • Delete old component files moved to views (confirm-change/, header, pricing-column, hooks, helpers, CSS)

Technical Details

  • Views have zero @tanstack/react-router imports — all routing isolated in thin wrapper
  • Dialog state uses compound object { open, planId } following established pattern
  • onConfirmPlanChange callback threads from PlansPagePlansListPlanPricingColumn
  • Helper tests (helpers.test.ts) moved alongside helpers to views directory

@vercel
Copy link

vercel bot commented Feb 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview, Comment Mar 2, 2026 5:14am

@rohanchkrabrty rohanchkrabrty changed the base branch from main to move-sdk-security February 26, 2026 04:51
@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

📥 Commits

Reviewing files that changed from the base of the PR and between 5604aa3 and 58814eb.

📒 Files selected for processing (12)
  • web/sdk/react/components/organization/billing/cycle-switch/index.tsx
  • web/sdk/react/components/organization/plans/index.tsx
  • web/sdk/react/components/organization/routes.tsx
  • web/sdk/react/views/plans/confirm-plan-change-dialog.tsx
  • web/sdk/react/views/plans/helpers/helpers.test.ts
  • web/sdk/react/views/plans/helpers/index.ts
  • web/sdk/react/views/plans/hooks/usePlans.tsx
  • web/sdk/react/views/plans/index.ts
  • web/sdk/react/views/plans/plans-header.tsx
  • web/sdk/react/views/plans/plans-page.tsx
  • web/sdk/react/views/plans/plans.module.css
  • web/sdk/react/views/plans/pricing-column.tsx

✏️ Tip: You can disable in-progress messages and the fortune message in your review settings.

Tip

CodeRabbit can enforce grammar and style rules using `languagetool`.

Configure the reviews.tools.languagetool setting to enable/disable rules and categories. Refer to the LanguageTool Community to learn more.

📝 Walkthrough

Walkthrough

This PR refactors the organization and project management UI by consolidating page-level logic into centralized page components, converting modals from route-driven to prop-driven, and removing embedded UI implementations. Several route handlers and inline components are deleted in favor of delegated page components that handle rendering and state.

Changes

Cohort / File(s) Summary
Billing & Pricing
web/sdk/react/components/organization/billing/cycle-switch/index.tsx, web/sdk/react/views/plans/*
Import path changes for hooks; simplified isUpgrade logic in cycle-switch. New PlansPage component with feature display and plan change dialogs; ConfirmPlanChangeDialog refactored to controlled props; PlanPricingColumn updated to callback-driven actions instead of navigation.
General Settings Refactor
web/sdk/react/components/organization/general/index.tsx, web/sdk/react/views/general/*
Organization general page simplified to delegate to GeneralPage. New GeneralPage component with permission-gated delete UI. DeleteOrganizationDialog converted to controlled dialog with onDeleteSuccess callback. Import paths and exports updated across the general module.
Organization Members Management
web/sdk/react/components/organization/members/index.tsx, web/sdk/react/views/members/*
Members page simplified to MembersPage delegation. New MembersPage component with data fetching and dialog management. InviteMemberDialog and RemoveMemberDialog refactored to controlled, prop-driven components. getColumns updated to accept onRemoveMember callback for inline removal actions.
Projects List & Details
web/sdk/react/components/organization/project/{add,delete,general,index,members/*,projects.*}, web/sdk/react/views/projects/list/*, web/sdk/react/views/projects/details/*
Complete removal of old project components (AddProject, DeleteProject, General, Members). New ProjectsListPage and ProjectDetailPage components with full data fetching, permission checks, and state management. New dialogs for add/delete with controlled props. Projects table columns refactored with callback-driven actions.
Teams List & Details
web/sdk/react/components/organization/teams/{add,delete,general,index,members/*,team.*}, web/sdk/react/views/teams/list/*, web/sdk/react/views/teams/details/*
Complete removal of old team components (AddTeam, DeleteTeam, General, Members, Invite). New TeamsListPage and TeamDetailPage components with data fetching and permission logic. New dialogs (DeleteTeamDialog, InviteTeamMemberDialog, AddTeamDialog) with controlled props and callbacks. Team columns refactored for callback-driven actions.
Security Settings
web/sdk/react/components/organization/security/index.tsx, web/sdk/react/views/security/*
Security page simplified to SecurityPage delegation. New SecurityPage component with preference fetching and permission-gated checkboxes. Removed SecurityHeader and SecurityCheckbox exports.
Organization Routing
web/sdk/react/components/organization/routes.tsx
Removed route definitions and imports for deleted modal components (DeleteOrganization, InviteMember, RemoveProjectMember, AddTeam, DeleteTeam, InviteTeamMembers, ConfirmPlanChange, MemberRemoveConfirm). Simplified route tree composition.
Shared Infrastructure
web/sdk/react/components/organization/shared/types.ts
Added BasePageProps interface and OnNavigate type to support callback-driven navigation across page components.
CSS & Styling
web/sdk/react/**/*.module.css
Removed project and team member table styling; added project/team detail styling (tabContent, container); minor formatting adjustments.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • rsbh
  • paanSinghCoder

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rohanchkrabrty rohanchkrabrty added the Do not merge Label to indicate that the PR is not ready to be merged even though might be (or not) approvals. label Feb 26, 2026
Copy link
Contributor

@paanSinghCoder paanSinghCoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check page - view renaming

Base automatically changed from move-sdk-security to main March 2, 2026 05:10
@rohanchkrabrty rohanchkrabrty enabled auto-merge (squash) March 2, 2026 05:13
@rohanchkrabrty rohanchkrabrty merged commit d94f4d7 into main Mar 2, 2026
7 of 8 checks passed
@rohanchkrabrty rohanchkrabrty deleted the move-sdk-plans branch March 2, 2026 05:18
@coveralls
Copy link

Pull Request Test Coverage Report for Build 22562400528

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 39.848%

Totals Coverage Status
Change from base Build 22562331567: 0.0%
Covered Lines: 13595
Relevant Lines: 34117

💛 - Coveralls

@coderabbitai coderabbitai bot mentioned this pull request Mar 2, 2026
@rohanchkrabrty rohanchkrabrty removed the Do not merge Label to indicate that the PR is not ready to be merged even though might be (or not) approvals. label Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants